<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
		</style>
		<script src="../js/jquery-3.2.1.min.js"></script>
		<script>
			$(function(){
				var initTop,initLeft;
				initTop=$("span").offset().top;
				initLeft=$("span").offset().left;
			$(window).scroll(function(){
				var st=$(this).scrollTop();
				if(st>initTop){
					$("span").css({"position":"fixed","top":0,"left":initLeft});
				}else{
					$("span").css("position","static");
				}
			});
		});			
		</script>
	</head>
	<body>
		<div id="head" style="height: 100px"></div>		
		<div id="search" style="text-align: center">
			<form><span>淘宝搜索:<input type="text" name="product"/><input type="submit" value="搜索" /></span></form>
		</div>
		<div style="height: 1000px;"></div>
	</body>
</html>
